import request from '@/router/axios';
let serveApi = '/api/dis-report/';
// import download from '@/router/downAxios'


// 文件模版-列表
export const getFileList = (current, size, params) => {
    return request({
        url: serveApi + 'file/list',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}
// 文件模版-保存
export const fileSave = (row) => {
    return request({
        url: serveApi + 'file/save',
        method: 'post',
        data: row
    })
}
// 文件模版-修改
export const fileUpdate = (row) => {
    return request({
        url: serveApi + 'file/update',
        method: 'post',
        data: row
    })
}
// 文件模版-删除
export const fileRemove = (ids) => {
    return request({
        url: serveApi + 'file/remove',
        method: 'post',
        params: {
            ids,
        }
    })
}


// 电能质量-列表
export const getDnzlList = (current, size, params) => {
    return request({
        url: serveApi + 'dnzl/list',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}
// 电能质量-审核列表
export const getDnzlAuditList = (current, size, params) => {
    return request({
        url: serveApi + 'dnzl/audit',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}
// 电能质量-查询列表
export const getDnzlViewList = (current, size, params) => {
    return request({
        url: serveApi + 'dnzl/page',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}
// 电能质量-保存
export const dnzlSave = (row) => {
    return request({
        url: serveApi + 'dnzl/save',
        method: 'post',
        data: row
    })
}
// 电能质量-修改
export const dnzlUpdate = (row) => {
    return request({
        url: serveApi + 'dnzl/update',
        method: 'post',
        data: row
    })
}
// 电能质量-删除
export const dnzlRemove = (ids) => {
    return request({
        url: serveApi + 'dnzl/remove',
        method: 'post',
        params: {
            ids,
        }
    })
}
// 电能质量-预览
export const dnzlView =serveApi + 'dnzl/view';
// 电能质量-查看凭证预览
export const dnzlPayProofView =serveApi + 'dnzl/payProofView';





// 环保检测
export const getHbjcList = (current, size, params) => {

    return request({
        url: serveApi + 'hbjc/list',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })

}
// 环保检测-审核列表
export const getHbjcAuditList = (current, size, params) => {
    return request({
        url: serveApi + 'hbjc/audit',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}
// 环保检测-查询列表
export const getHbjcViewList = (current, size, params) => {
    return request({
        url: serveApi + 'hbjc/page',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}
// 环保检测-保存
export const hbjcSave = (row) => {
    return request({
        url: serveApi + 'hbjc/save',
        method: 'post',
        data: row
    })
}
// 环保检测-修改
export const hbjcUpdate = (row) => {
    return request({
        url: serveApi + 'hbjc/update',
        method: 'post',
        data: row
    })
}
// 环保检测-删除
export const hbjcRemove = (ids) => {
    return request({
        url: serveApi + 'hbjc/remove',
        method: 'post',
        params: {
            ids,
        }
    })
}
// 环保检测-预览
export const hbjcView =serveApi + 'hbjc/view';














// 物资检测
export const getWzjcList = (current, size, params) => {

    return request({
        url: serveApi + 'wzjc/list',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })

}











// 新能源并网性能
export const getXnybwxnList = (current, size, params) => {

    return request({
        url: serveApi + 'xnybwxn/list',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })

}
// 新能源并网性能检测-审核列表
export const getXnybwxnAuditList = (current, size, params) => {
    return request({
        url: serveApi + 'xnybwxn/audit',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}
// 新能源并网性能检测-查询列表
export const getXnybwxnViewList = (current, size, params) => {
    return request({
        url: serveApi + 'xnybwxn/page',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}
// 新能源并网性能检测-保存
export const xnybwxnSave = (row) => {
    return request({
        url: serveApi + 'xnybwxn/save',
        method: 'post',
        data: row
    })
}
// 新能源并网性能检测-修改
export const xnybwxnUpdate = (row) => {
    return request({
        url: serveApi + 'xnybwxn/update',
        method: 'post',
        data: row
    })
}

// 新能源并网性能检测-删除
export const xnybwxnRemove = (ids) => {
    return request({
        url: serveApi + 'xnybwxn/remove',
        method: 'post',
        params: {
            ids,
        }
    })
}
// 新能源并网性能检测-预览
export const xnybwxnView =serveApi + 'xnybwxn/view';
// 新能源-查看凭证预览
export const xnyPayProofView =serveApi + 'xnybwxn/payProofView';

// 仪器仪表-查询列表
export const getYqybList = (current, size, params) => {
    return request({
        url: serveApi + 'yqyb/list',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}













// 仪器仪表-查询列表
export const getDeviceList = (current, size, params) => {
    return request({
        url: serveApi + 'yqyb/deviceList',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}
// 仪器仪表-保存
export const yqybSave = (row) => {
    return request({
        url: serveApi + 'yqyb/save',
        method: 'post',
        data: row
    })
}
// 仪器仪表-修改
export const yqybUpdate = (row) => {
    return request({
        url: serveApi + 'yqyb/update',
        method: 'post',
        data: row
    })
}
// 仪器仪表-删除
export const yqybRemove = (ids) => {
    return request({
        url: serveApi + 'yqyb/remove',
        method: 'post',
        params: {
            ids,
        }
    })
}
// 生成送检单
export const joinDeviceForm = (ids)=> {
    return request({
        url: serveApi + 'yqyb/joinDeviceForm',
        method: 'post',
        params: {
            ids,
        }
    })
}
// 送检单-列表
export const getYqybFormList = (current, size, params) => {
    return request({
        url: serveApi + 'yqybForm/list',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}
// 送检单-审核列表
export const getYqybFormAuditList = (current, size, params) => {
    return request({
        url: serveApi + 'yqybForm/audit',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}
// 送检单-查询列表
export const getYqybFormViewList = (current, size, params) => {
    return request({
        url: serveApi + 'yqybForm/page',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}
// 送检单-保存
export const yqybFormSave = (row) => {
    return request({
        url: serveApi + 'yqybForm/save',
        method: 'post',
        data: row
    })
}
// 送检单-修改
export const yqybFormUpdate = (row) => {
    return request({
        url: serveApi + 'yqybForm/update',
        method: 'post',
        data: row
    })
}
// 送检单-删除
export const yqybFormRemove = (ids) => {
    return request({
        url: serveApi + 'yqybForm/remove',
        method: 'post',
        params: {
            ids,
        }
    })
}





// 知识库-查找
export const getZskList = (current, size, params) => {
    return request({
        url: serveApi + 'zsk/list',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}
// 知识库-保存
export const zskSave = (row) => {
    return request({
        url: serveApi + 'zsk/save',
        method: 'post',
        data: row
    })
}
// 知识库-删除
export const zskRemove = (ids) => {
    return request({
        url: serveApi + 'zsk/remove',
        method: 'post',
        params: {
            ids,
        }
    })
}
// 知识库-更新
export const zskUpdate = (row) => {
    return request({
        url: serveApi + 'zsk/update',
        method: 'post',
        data: row
    })
}
// 知识库-附件上传更新
export const zskUpload = function(row){
    request({
        url: serveApi + 'zsk/update',
        method: 'post',
        data: row
    })
}

// 仪器仪表台账-查找
export const getYqybTzybist = (current, size, params) => {
    return request({
        url: serveApi + 'yqybtz/list',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}
// 仪器仪表台账-保存
export const yqybTzSave = (row) => {
    return request({
        url: serveApi + 'yqybtz/save',
        method: 'post',
        data: row
    })
}
// 仪器仪表台账-删除
export const yqybTzRemove = (ids) => {
    return request({
        url: serveApi + 'yqybtz/removeYqybTz',
        method: 'post',
        params: {
            ids,
        }
    })
}
// 仪器仪表台账-更新
export const yqybTzUpdate = (row) => {
    return request({
        url: serveApi + 'yqybtz/update',
        method: 'post',
        data: row
    })
}
// 仪器仪表台账-附件上传更新
export const yqybTzUpload = function(row){
    request({
        url: serveApi + 'yqybtz/upload',
        method: 'post',
        data: row
    })
}




// 试验检测-查找
export const getSyjcAttorneyList = (current, size, params) => {
    return request({
        url: serveApi + 'syjcAttorney/list',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}
// 试验检测-保存
export const syjcAttorneySave = (row) => {
    return request({
        url: serveApi + 'syjcAttorney/save',
        method: 'post',
        data: row
    })
}
// 试验检测-删除
export const SyjcAttorneyremove = (ids) => {
    return request({
        url: serveApi + 'syjcAttorney/remove',
        method: 'post',
        params: {
            ids,
        }
    })
}
// 试验检测-更新
export const syjcAttorneyUpdate = (row) => {
    return request({
        url: serveApi + 'syjcAttorney/update',
        method: 'post',
        data: row
    })
}





// 电能质量-流程模型ID
export const dnzlFlowModelId = '1512276773296431106';
// 电能质量-流程提交
export const dnzlSubmit =serveApi + 'dnzl/flowSubmit';
// 电能质量-流程驳回
export const dnzlReturnSubmit =serveApi + 'dnzl/returnSubmit';



// 环保检测-流程模型ID
export const hbjcFlowModelId = '1521423357607157762';
// 环保检测-流程提交
export const hbjcSubmit =serveApi + 'hbjc/flowSubmit';
// 环保检测-流程驳回
export const hbjcReturnSubmit =serveApi + 'hbjc/returnSubmit';
// 环保检测-封面打印
export const hbjcPrint = serveApi + 'hbjc/print';




// 仪器仪表-流程模型ID
export const yqybFormFlowModelId = '1521422004021370881';
// 仪器仪表-流程提交
export const yqybFormSubmit =serveApi + 'yqybForm/flowSubmit';
// 仪器仪表-封面打印
export const yqybFormPrint = serveApi + 'yqybForm/print';
// 仪器仪表-流程驳回
export const yqybFormReturnSubmit =serveApi + 'yqybForm/returnSubmit';








// 新能源并网-流程模型ID
export const xnyFlowModelId = '1521430483478085634';
// 新能源并网-流程提交
export const xnySubmit =serveApi + 'xnybwxn/flowSubmit';
// 新能源并网-流程驳回
export const xnyReturnSubmit =serveApi + 'xnybwxn/returnSubmit';
// 新能源并网-封面打印
export const xnyPrint =serveApi + 'xnybwxn/print';



// 文件管理-下载查看
export const filePrint =serveApi + 'file/view';
// 新下载
export const filePrintByUrl =serveApi + 'file/viewByUrl';

// 电能质量-下载查看
export const dnzlPrint =serveApi + 'dnzl/print';
